package mlz.a_oop;

//对个对象指向相同
public class PersonTest03 {
    public static void main(String[] args) {
        Person p1 = new Person(); // 001
        p1.age = 18;
        p1.name = "张三";
        //把第一个对象的地址值赋值给第二个对象
        Person p2 = p1;
        p2.age = 30;
        p2.name = "李四";

        System.out.println(p1.age);
        System.out.println(p1.name);
    }
}
